package com.cloud.layuimini.entity;

import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;


/**
 CREATE TABLE `system_menu` (
 `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
 `pid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '父ID',
 `title` varchar(100) NOT NULL DEFAULT '' COMMENT '名称',
 `icon` varchar(100) NOT NULL DEFAULT '' COMMENT '菜单图标',
 `href` varchar(100) NOT NULL DEFAULT '' COMMENT '链接',
 `target` varchar(20) NOT NULL DEFAULT '_self' COMMENT '链接打开方式',
 `sort` int(11) DEFAULT '0' COMMENT '菜单排序',
 `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态(0:禁用,1:启用)',
 `remark` varchar(255) DEFAULT NULL COMMENT '备注信息',
 `create_at` timestamp NULL DEFAULT NULL COMMENT '创建时间',
 `update_at` timestamp NULL DEFAULT NULL COMMENT '更新时间',
 `delete_at` timestamp NULL DEFAULT NULL COMMENT '删除时间',
 PRIMARY KEY (`id`),
 KEY `title` (`title`),
 KEY `href` (`href`)
 ) ENGINE=InnoDB AUTO_INCREMENT=250 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='系统菜单表';
 */
@Data
@Entity
@Table(name = "t_menu")
public class MenuEntity implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    @Basic
    @Column(name = "title", nullable = false, length = 50)
    private String title;
    @Basic
    @Column(name = "href", length = 50)
    private String href;
    @Basic
    @Column(name = "pid", length = 50)
    private Long pid;
    @Basic
    @Column(name = "icon", length = 50)
    private String icon;
    @Basic
    @Column(name = "target",  length = 50)
    private String target;
    @Basic
    @Column(name = "sort", length = 50)
    private Integer sort;
    @Basic
    @Column(name = "status",length = 50)
    private Boolean status;
    @Basic
    @Column(name = "remark", length = 50)
    private String remark;
    @Basic
    @Column(name = "create_at", length = 50)
    private Date create_at;
    @Basic
    @Column(name = "update_at", length = 50)
    private Date update_at;
    @Basic
    @Column(name = "delete_at", length = 50)
    private Date delete_at;
}
